package com.hbnu.controller;

import com.hbnu.service.ServerTread;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(8888);
            System.out.println("服务器已启动");
            while (true){
                Socket user = serverSocket.accept();
                new Thread(new ServerTread(user)).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
